@echo off
REM =====================================================================
REM ESBServer Build script
REM =====================================================================
REM Launches ant with the proper build file and proper classpath
REM Pass specific targets as arguments to this build file if needed
REM =====================================================================
setlocal

if not defined BCPSDK_HOME	goto :NoBCPSDKFound

call "%~dp0..\..\..\..\setenv.bat"
cd /d "%~dp0"

if not defined JAVA_HOME 	goto :NoJavaFound

"%JAVA_HOME%\bin\java.exe" -cp "%ANT_CP%" org.apache.tools.ant.Main "-Droot.dir=%BUILD_HOME%" "-Dsdk.dir=%BCPSDK_HOME%" %*
goto :end

:NoBCPSDKFound
echo BCPSDK_HOME environment variable is not set.
goto :end

:NoJavaFound
echo JAVA_HOME environment variable is not set.
goto :end

:end
endlocal
if defined EXIT_BUILD exit
